package com.jshop.admin.sys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jshop.admin.sys.entity.SysUserEntity;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 系统用户
 *
 */
@Repository("sysUserDao")
public interface SysUserDao extends BaseMapper<SysUserEntity> {


    SysUserEntity queryObject(Object id);


    List<SysUserEntity> queryList(Map<String, Object> map);


    int queryTotal(Map<String, Object> map);


    void save(SysUserEntity t);



    int deleteBatch(Object[] id);
    /**
     * 查询用户的所有权限
     *
     * @param userId 用户ID
     */
    List<String> queryAllPerms(Integer userId);

    /**
     * 查询用户的所有菜单ID
     */
    List<Integer> queryAllMenuId(Integer userId);

    /**
     * 根据用户名，查询系统用户
     */
    SysUserEntity queryByUserName(String username);

    /**
     * 修改密码
     */
    int updatePassword(Map<String, Object> map);

    /*
    *  管理员修改商户密码
    */
    /**
     * 根据实体类查询
     * @return
     */
//    List<UserWindowDto> queryListByBean(UserWindowDto userWindowDto);


    SysUserEntity queryMobile(String mobile);


    SysUserEntity queryPassword(String password);

    /*
    *
    */

    public int saveAll(List<SysUserEntity> ids);

    Integer querySysUserId(Integer merchantId);


    int getUserName(String userName);
}
